package org.gpswalker.sys.server.misc;

import java.io.PrintWriter;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import org.gpswalker.sys.components.TemplateConfigurationSingleton;

public class Error404 {

    public static void $404(String reason, HttpServletResponse res,
            Map<String, Object> dataModel) {
        dataModel.put("title", "Error 404");
        dataModel.put("reason", reason);
        TemplateConfigurationSingleton.getInstance().processTemplate("404.ftl",
                res, dataModel);
    }

    @Deprecated
    public static void $404(String reason, PrintWriter out) {

    }

    public static void handleNullUserError(ServletInOut sio) {
        sio.println("Null user violation in "
                + sio.getRequest().getRequestURI());
    }

    public static void handleReferrerViolation(ServletInOut sio) {
        // TODO Auto-generated method stub
        sio.println("Error adding the new entity");
    }

}
